{% extends "toast/base.template.html" %}

{% block breadcrumbs %}
	<li class="active">Meetings</li>
{% endblock %}


{% block sidecontent %}
	<form method="POST" action="/toast/meeting/add/">
	{% csrf_token %}
		<p class="lead">Create Meeting</p>
		<p class="divider"></p>
		{% for field in form %}
			<h6>{{ field.label }}</h6>
			{{ field }}
			<p class="text-error">{{ field.errors.as_text }}</p>
		{% endfor %}
		<input class="btn btn-primary" name="meeting_add" type="submit" value="Create Meeting" />
	</form>
{% endblock %}


{% block content %}
{% if list_of_meetings %}
	<table class="table">
		<thead>
			<tr>
				<th>ID</th>
				<th>Meeting</th>
				<th>Location</th>
				<th>Date &amp; Time</th>
				<th>Action(s)</th>
			</tr>
		</thead>

		<tbody>
		{% for meeting in list_of_meetings %}
		<tr>
			<td>{{ meeting.id }}</td>
			<td><a href="/toast/meeting/view/{{ meeting.id }}">{{ meeting.name }}</a></td>
			<td><a href="/toast/address/view/{{ meeting.address.id }}" rel="tooltip" title="{{ meeting.address.full_address }}">{{ meeting.address.name }}</a></td>
			<td>{{ meeting.start_datetime }}</td>
			<td>
			<div class="btn-group pull-right">
				<a class="btn btn-primary" href="#"><i class="icon-wrench icon-white"></i> Actions</a>
				<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
				<ul class="dropdown-menu">
					<li><a href="/toast/meeting/view/{{ meeting.id }}"><i class="icon-eye-open"></i> View</a></li>
					<li><a href="/toast/meeting/edit/{{ meeting.id }}"><i class="icon-pencil"></i> Edit</a></li>
					<li><a href="/toast/meeting/delete/{{ meeting.id }}" class="confirm" message="Are you sure you want to delete this meeting ({{ meeting.name }})?"><i class="icon-trash"></i> Delete</a></li>
				</ul>
			</div>
			<div class="clearfix"></div>
			</td>
		</tr>
		{% endfor %}
		</tbody>
	</table>
{% else %}
	<p class="text-info">No meetings found.</p>
{% endif %}
{% endblock %}








